package com.example.demo.controller;


import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;

@Service
@Component
public class HelloController {
    @Bean
    public User user(){
        User user=new User();
        user.setAge(18);
        user.setName("张三");
        return user;
    }
    @Bean
    public User user1(){
        User user=new User();
        user.setAge(18);
        user.setName("张三");
        return user;
    }
}
